package org.jeecg;

import cn.org.atool.generator.FileGenerator;
import cn.org.atool.generator.annotation.Column;
import cn.org.atool.generator.annotation.Table;
import cn.org.atool.generator.annotation.Tables;

/**
 *
 */
public class ExamAutoMapperMain {
    public static final String url =
            "jdbc:mysql://rm-bp11dmc90193u1rk5ro.mysql.rds.aliyuncs"
                    + ".com:3306/make_friends?characterEncoding=UTF-8&useUnicode=true&useSSL=false"
                    + "&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai";

    public static void main(String[] args) throws Exception {
        FileGenerator.build(Empty.class);
    }

    @Tables(
            // 设置数据库连接信息
            url = url, username = "root", password = "XiaoTan2010_",
            // 设置entity类生成src目录, 相对于 user.dir
            srcDir = "jeecg-module-friends/src/main/java",
            // 设置entity类的package值
            basePack = "org.jeecg.modules.friends.store",
            // 设置dao接口和实现S的src目录, 相对于 user.dir
            daoDir = "jeecg-module-friends/src/main/java",
            // testDir = "src/main/java",
            // 设置哪些表要生成Entity文件
            tables = {
                    @Table(value = {"moments"}, gmtCreated = "add_time", gmtModified = "update_time", columns = {
                            @Column(value = "selected", javaType = Boolean.class),
                            @Column(value = "hidden_flag", javaType = Boolean.class)}),

                    @Table(value = {"moments_review"}, gmtCreated = "add_time", gmtModified = "update_time", columns = {
                            @Column(value = "is_read", javaType = Boolean.class),
                            @Column(value = "at_is_read", javaType = Boolean.class)}),
                    @Table(value = {"moments_pics"}, gmtCreated = "add_time", gmtModified = "update_time"),
                    //                    @Table(value = {"business_dictionary"}, gmtCreated = "add_time",
                    //                   gmtModified = "update_time"),
            }
    )
    static class Empty {
    }

}
